Import Interface Dialog
Synchronization
When you import an interface, you can choose to compare the signals by name or external name.
Name
The signal name specified in the Declaration Editor is compared to the signal name in the file to be imported.
Select Name:
- if the file to be imported contains no external names
- if the TPT project contains no external names
- if the TPT project contains external names that should be updated with the changed external names in the interface to be imported
In the example above, TPT recognizes the signals by name. The external name of channel_b
will be removed, channel_a
gets the external name ABC, and param_1
receives the external name DEF.
The external name is specified in the Declaration Editor in a mapping that uses a Rename mapping flavor, see Mapping Flavor - Rename. TPT finds the signals whose external name in TPT equals the signal name of the external file.
Select External Name:
- if the file to be imported contains external names
- if the TPT project contains external names
- if the TPT project contains other signal names than the interface to be imported (for example shorter names)
In the example above, TPT recognizes the signals by their external name. The external name ABC is linked to the signal name channel_b
in the TPT project and to channel_a
in the file to be imported. Therefore channel_a
is removed and channel_b
is renamed to channel_a
.
When you select External Name, the Name column is disabled by default, so the signal name of the external file does not overwrite the signal name in TPT. Enable the Name column if you like to overwrite the signal name. Once you enabled the Name column it stays enabled until you manually disable it.
Mapping
All target mappings are available in the drop-down list.
The target mapping will affect the status calculation of the signals to be imported.
Filter options
To filter the signals depending on their types, click on the corresponding icon, see Figure "Filter options").
To filter the signals depending on their import status: Changed, Unchanged, New, Removed, select the corresponding checkbox. To filter the signals depending on their names, enter a term in the text field. To activate the use of regular expressions for search and filter, select Regular Expressions.
For example, the term ^L.*(g|y)$ will search a signal that begins with an L and ends with an g or an y. The search is not case-sensitive.
Status
When importing an interface, the signals are marked as follows:
New
The signal is unknown to the currently opened TPT project; this could be the effect of renaming the signal in the interface of the currently opened TPT project.
Unchanged
The signal already exists in the currently opened TPT project with the same properties.
Changed
The signal already exists in the currently opened TPT project but with other properties. Changed elements are highlighted. Hover with the mouse over the highlighted area to see the old and the new value.
Removed
The signal is found in the currently opened TPT project but not in the interface you are about to import.
Action
There are six actions available that can be selected from a drop-down list in the Action column:
Add
Adds a new item to the declaration.
Modify
Applies changes to the item.
Ignore
Nothing is changed.
Remove
The item will be deleted.
Rename
Properties of the removed signal are overwritten with the properties of the new signal. This also applies to the name if the Import rename to mapping checkbox is not selected.
Hide
The Hidden flag of the Rename mapping flavor in the Declaration Editor is set to true. The signal will be hidden (grounded) not deleted.
If a signal has the status Removed, you can select the action ignore, rename, hide, or remove. If a signal has the status Changed, you can ignore or modify it. If a signal has the status New, you can add, ignore, or rename it.
Rename
A renaming of signals is only possible when a signal from the TPT project is marked as to be Removed and at least one signal from the file to be imported is marked as New.
The signal to be removed is not replaced by the signal to be imported. It is kept, but it changes its name and its properties. Simultaneously, a refactoring is performed by TPT.
Refactoring will have no effect in the MATLAB view, the Dashboard script, in the Signal Comparison assesslet, and in the Condition Tree assesslet.
A signal If you select signal By clicking OK, signal
|
Default All
Applies the following default actions:
- new element --> add element
- unchanged element --> ignore element
- changed element --> modify element
- removed element --> remove element
Ignore All
Ignores all changes.
Default Selected
Applies the default actions to the selected elements.
Hide new signals in other mappings
By default, new signals are not hidden. Select this checkbox if you want new signals to receive the Hidden flag in all mappings with a Rename mapping flavor except in the mapping selected as target mapping.
Import rename to mapping
If a Rename action is performed, the signal to be removed keeps its name but takes over the properties of the new signal. The name of the new signal is added to the Rename mapping flavor of the signal to be removed.
The name of the new signal is added as external name to the signal to be removed.
TPT adds a Rename mapping flavor to the selected target mapping or to a new mapping.
Import values to mapping
A change of the value is highlighted in the table. Hover with the mouse over the entry to see the old and the new value.
If deselected:
- a new value in the Value column will replace the old value
- a new value in the Init_Value column will replace the old initial value
- the Init_Value column shows the new initial value
The Init_Value column is hidden unless the imported interface contains an initial values mapping with importable initial values. In case the interface to be imported contains no value or no importable values, the Import values to mapping checkbox is deactivated.
If selected:
- the Value column is deactivated, the old value is displayed and will be kept
- the Init_Value column is activated
- the new value of the Value column is added to the Init_Value column
You can manually activate the Value column. Then, the new value would be imported both to the Value and the Init Values mapping flavor. Deactivating the Init_Values column will automatically deselect the Import value to mapping checkbox.
Export to Excel
You can export information about all changes to an Excel file. Click Export to Excel to specify the file. All values in the lines that contain Add, Modify, Rename or Remove in column Action are exported to the file. For each property the columns: old, imported and now in TPT are inserted in the Excel file.
Guess renames
This option is only available when at least one New and one Removed signal exists in the interface to be imported. Click on Guess renames to find matches for signal names automatically based on name similarities. Matches are shown in the Suggested signals renames dialog.
Suggested signal renames
Select the checkbox to apply the rename, deselect the checkbox to discard the rename.
Click OK to link the selected rename pairs of New<->Removed items in the import table. You can still make changes/adaptations in this table.